package com.test;

import com.test.entity.Person;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashSet;
import java.util.Set;

/**
 * Created by 陈睿 on 2015/12/16.
 */
@RestController
@RequestMapping("/hello")
public class HelloWorldController {
    @RequestMapping("/world")
    @ResponseBody
    public Set<Person> print() {
        Person person = new Person();
        person.setFirstName("rui");
        person.setLastName("chen");
        Set<Person> ret = new HashSet<Person>();
        ret.add(person);
        return ret;
    }
}
